const { query } = require("../db/query")
module.exports = {
  // 获取我的收藏列表
  getMyCollect: async (user_id) => {
    // 调用query发送sql语句到mysql进行注册用户
    return await query("select petinformation.* from mycollection,petinformation where mycollection.user_id = ? and mycollection.pet_id = petinformation.pet_id and mycollection.collection_status = 'true';", [user_id])
  },
  // 获取我的发布列表
  getMyRelease: async (user_id) => {
    // 调用query发送sql语句到mysql进行注册用户
    return await query("select * from petinformation where user_id = ?", [user_id])
  }
}